import wsgiref.handlers

from google.appengine.ext import webapp

from list_new_request_handler import NewListRequestHandler
from list_view_request_handler import ViewListRequestHandler
from list_updatevisibility_request_handler import UpdateVisibilityListRequestHandler

def main():
    # Creating a WSGI Application Handler
    application = webapp.WSGIApplication([
                                          ( '/list/new', NewListRequestHandler ),
                                          ( '/list/view/(\d+)/?$', ViewListRequestHandler ), # KeyID referring to the List is Expected
                                          ( '/list/update', NewListRequestHandler ),
                                          ( '/list/update/visibility', UpdateVisibilityListRequestHandler ),
                                          ( '/list/delete', NewListRequestHandler ),
                                          ( '/list/add', NewListRequestHandler ),
                                          ( '/list/remove', NewListRequestHandler ),
                                          ( '/list/modify', NewListRequestHandler ),
                                          ], debug=True )
    # Executing the WSGI Application
    wsgiref.handlers.CGIHandler().run( application )

if __name__ == "__main__":
    main()